//
//  NSString+Sandbox.m
//  Categorys
//
//  Created by 方正刚 on 2017/8/4.
//  Copyright © 2017年 taihankeji. All rights reserved.
//

#import "NSString+Sandbox.h"

@implementation NSString (Sandbox)

- (instancetype)appendDocument {
    return [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:[self lastPathComponent]];
}

- (instancetype)appendCache{
    return [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:[self lastPathComponent]];
}

- (instancetype)appendTmp{
    return [NSTemporaryDirectory() stringByAppendingPathComponent:[self lastPathComponent]];
}

@end
